package cn.smxy.doc;

import cn.smxy.pojo.Plant;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class PlantDoc extends Plant {

    /**
     * 用于模糊查询字段
     */
    private String all;

    public PlantDoc(Plant plant) {
        super(plant.getPlantId(),plant.getPlantName(),plant.getPlantSpecific(),
                plant.getLatinName(),plant.getCategoryId(),plant.getFamilyId(),
                plant.getPlantDescription(),plant.getAddress(),plant.getPlantPicture(),
                plant.getUserId(),plant.getCreateTime(),plant.getIsChoiceness());
        this.all = plant.getPlantName()+plant.getLatinName()+plant.getPlantSpecific()+plant.getPlantDescription();
    }
}
